package com.baizan.daka.mvp.model

import com.baizan.daka.util.SchedulerUtils
import com.hazz.kotlinmvp.net.BaseResponse
import com.hazz.kotlinmvp.net.RetrofitManager
import io.reactivex.Observable

class OrderModel {

    fun payOrder(goodsId:Long,goodsType:Int): Observable<BaseResponse<String>> {
        return RetrofitManager.service.payOrder(goodsId,goodsType,950)
            .compose(SchedulerUtils.ioToMain())
    }
    fun payOrderHtml(goodsId:Long,goodsType:Int,payType:String): Observable<String> {
        return RetrofitManager.Htmlservice.payOrderHtml(goodsId,goodsType,payType)
            .compose(SchedulerUtils.ioToMain())

    }

    fun getPayChannelList() = RetrofitManager.service.getPayChannelList()
        .compose(SchedulerUtils.ioToMain())

}